<?php

/*
 * Edit by shengxin
 * Click nbfs://nbhost/SystemFileSystem/Templates/Scripting/PHPClass.php to edit this template
 */

namespace api\mall\task;

use api\portal\service\UserInfoService;

/**
 * Description of CuriosityTask
 *
 * @author PC
 */
class PromoteTask extends TaskChecker{
//    public function check_comp($task) {
//        if($task['task_data'] >= 62){
//            return true;
//        }
//        return false;
//    }

    protected function queryTaskData($user):int {
//        $model = new UserPromoteRelationModel();
//        $pnum = $model->where('parent_id',$user['id'])->count();
//        return $pnum;
        $svc = new UserInfoService();
        $info = $svc->userInviteInfo($user['id']);
        return $info['invite_size'];
    }
}
